package cn.kgc.spring02.entity;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/4/26
 * @Description:
 */
public class Student {

    private String name;
    private Integer age;

    private Teacher teacher2;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Teacher getTeacher() {
        return teacher2;
    }

    public void setTeacher2(Teacher teacher) {
        this.teacher2 = teacher;
    }

    public Student(){}

    public Student(Integer age){
        this.age = age;
    }

    public Student(String name,Integer age){
        this.age = age;
        this.name =name;
        System.out.println("Student(String name,Integer age)");
    }


    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", teacher=" + teacher2 +
                '}';
    }
}
